<div style="border-bottom: 1px solid gray; margin-bottom: 8px;">
  <table cellspacing="1" cellpadding="4" class="tabs">
    <tr>
    <?
    foreach($tabs as $tab)
    {
      if (strpos($tab['url'], $_REQUEST['controller'].'/'.$_REQUEST['action']) > 0)
      {
      ?><td class="tab_active"><a href="<?= $tab['url'] ?>"><?= $tab['caption'] ?></a></td><?
      }
      else
      {
      ?><td class="tab_inactive"><a href="<?= $tab['url'] ?>"><?= $tab['caption'] ?></a></td><?
      }
    }
    ?>
    </tr>
  </table>
</div>